ISRO CSE 2020
Q21.
The following circuit compares two 2-bit binary numbers, X and Y represented by X_{1}X_{0} and Y_{1}Y_{0} respectively. (X_{0} and Y_{0} represent Least Significant Bits)Under what conditions Z will be 1?Q22.
Minimum number of NAND gates required to implement the following binary equationY=(\bar{A}+\bar{B})(C+D)Q23.
If ABCD is a 4-bit binary number, then what is the code generated by the following circuit?Q24.
Consider product of three matrices M_{1},M_{2} and M_{3} having w rows and x columns, x rows and y columns, and y rows and z columns. Under what condition will it take less time to compute the product as \left(M_{1} M_{2}\right) M_{3} than to compute M_{1}\left(M_{2} M_{3}\right) ?Q25.
G is an undirected graph with vertex set {v1, v2, v3, v4, v5, v6, v7} and edge set {v1v2, v1v3, v1v4 ,v2v4, v2v5, v3v4, v4v5, v4v6, v5v6, v6v7 }. A breadth first search of the graph is performed with v1 as the root node. Which of the following is a tree edge?Q26.
G is an undirected graph with vertex set {v1, v2, v3, v4, v5, v6, v7} and edge set {v1v2, v1v3, v1v4 ,v2v4, v2v5, v3v4, v4v5, v4v6, v5v6, v6v7 }. A breadth first search of the graph is performed with v1 as the root node. Which of the following is a tree edge?Q27.
Consider the following recursive C function that takes two arguments unsigned int rer(unsigned int n, unsigned int r){ if(n>0)return(n%r + rer(n/r,r)); else retturn 0; }What is the return value of the function rer when it is called as rer(513,2)?Q28.
In the following procedure Integer procedure P(X,Y); Integer X,Y; value x; begin K=5; L=8; P=x+y; endX is called by value and Y is called by name. If the procedure were invoked by the following program fragment K=0; L=0; Z=P(K,L);then the value of Z will be set equal toQ29.
What is the output in a 32 bit machine with 32 bit compiler? #include < stdio.h > rer(int **ptr2, int **ptr1) { int *ii; ii=*ptr2; *ptr2=*ptr1; *ptr1=ii; **ptr1*=**ptr2; **ptr2+=**ptr1; } void main(){ int var1=5, var2=10; int *ptr1=&var1,*ptr2=&var2 rer(&ptr1,&ptr2); printf("%d %d",var2,var1); }Q30.
In linear hashing, if blocking factor bfr, loading factor i and file buckets N are known, the number of records will be